Skip to content

Link collectors via OBJECT library so self-registration runs - #53

Merged
patryk-przybysz merged 1 commit into
develfrom
fix/agent-static-lib-collector-registration
Aug 9, 2026
Merged

Link collectors via OBJECT library so self-registration runs#53
patryk-przybysz merged 1 commit into
develfrom
fix/agent-static-lib-collector-registration

Conversation

@patryk-przybysz

Copy link
Copy Markdown
Collaborator

Summary

  • Collector self-registration relies on static initializers in RegisteredCollector<Derived> (src/collectors/collector.h). Since Add GoogleTest foundation and SeriesBuffer unit tests #49 moved sources into volta_lib as a STATIC library and main.cc references no collector symbols, the linker discards the collector translation units - the registry is empty at runtime and the agent silently collects zero metrics.
  • Build volta_lib as an OBJECT library so all collector objects are always linked.

Closes #52

@patryk-przybysz patryk-przybysz self-assigned this Aug 8, 2026
@patryk-przybysz
patryk-przybysz force-pushed the fix/agent-static-lib-collector-registration branch from 4b2f5a9 to 0ad4b15 Compare August 8, 2026 22:15

@FW-Nagorko FW-Nagorko left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@patryk-przybysz
patryk-przybysz merged commit 0454271 into devel Aug 9, 2026
1 check passed
@patryk-przybysz
patryk-przybysz deleted the fix/agent-static-lib-collector-registration branch August 9, 2026 01:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants